angular.module('user', ['wheresmyapi']).config(
  function($routeProvider) {
    $routeProvider.
      when('/', {controller: UserListCtrl, template: 'userlist.html'}).
      when('/edit/:userId', {controller: UserEditCtrl, template: 'user.html'}).
      otherwise({redirectTo:'/'});
  });

function UserListCtrl ($scope, User) {
  $scope.users = User.query();
}

function UserEditCtrl ($scope, $location, $routeParams, User) {
  var self = this;
  
}